package com.ruoyi.ship.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ship.mapper.TqwlShipInfoMapper;
import com.ruoyi.ship.domain.TqwlShipInfo;
import com.ruoyi.ship.service.ITqwlShipInfoService;

/**
 * 船信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-05
 */
@Service
public class TqwlShipInfoServiceImpl implements ITqwlShipInfoService 
{
    @Autowired
    private TqwlShipInfoMapper tqwlShipInfoMapper;

    /**
     * 查询船信息
     * 
     * @param shipId 船信息主键
     * @return 船信息
     */
    @Override
    public TqwlShipInfo selectTqwlShipInfoByShipId(Long shipId)
    {
        return tqwlShipInfoMapper.selectTqwlShipInfoByShipId(shipId);
    }

    /**
     * 查询船信息列表
     * 
     * @param tqwlShipInfo 船信息
     * @return 船信息
     */
    @Override
    public List<TqwlShipInfo> selectTqwlShipInfoList(TqwlShipInfo tqwlShipInfo)
    {
        return tqwlShipInfoMapper.selectTqwlShipInfoList(tqwlShipInfo);
    }

    /**
     * 新增船信息
     * 
     * @param tqwlShipInfo 船信息
     * @return 结果
     */
    @Override
    public int insertTqwlShipInfo(TqwlShipInfo tqwlShipInfo)
    {
        return tqwlShipInfoMapper.insertTqwlShipInfo(tqwlShipInfo);
    }

    /**
     * 修改船信息
     * 
     * @param tqwlShipInfo 船信息
     * @return 结果
     */
    @Override
    public int updateTqwlShipInfo(TqwlShipInfo tqwlShipInfo)
    {
        tqwlShipInfo.setUpdateTime(DateUtils.getNowDate());
        return tqwlShipInfoMapper.updateTqwlShipInfo(tqwlShipInfo);
    }

    /**
     * 批量删除船信息
     * 
     * @param shipIds 需要删除的船信息主键
     * @return 结果
     */
    @Override
    public int deleteTqwlShipInfoByShipIds(Long[] shipIds)
    {
        return tqwlShipInfoMapper.deleteTqwlShipInfoByShipIds(shipIds);
    }

    /**
     * 删除船信息信息
     * 
     * @param shipId 船信息主键
     * @return 结果
     */
    @Override
    public int deleteTqwlShipInfoByShipId(Long shipId)
    {
        return tqwlShipInfoMapper.deleteTqwlShipInfoByShipId(shipId);
    }
}
